import java.util.Scanner;

public class demo2 {
    public static String fun(String str) {
        int len=str.length();
        String ret = new String();
        int fast=0;
        int slow=0;
        int max=0;
        while(fast<len) {
            if(str.charAt(fast)>='0'&&str.charAt(fast)<='9' && fast!=len-1) {
                fast++;
            } else {
                if(fast-slow>max) {
                    max=fast-slow;
                    if(fast==len-1) {
                        fast+=1;
                        ret=str.substring(slow,fast);
                        break;
                    }
                    ret=str.substring(slow,fast);
                    slow=fast;
                    continue;
                }
                fast++;
                slow=fast;
            }
        }
        return ret;
    }
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        System.out.println(fun(str));
    }
}